<div class="row" xmlns:th="http://www.w3.org/1999/xhtml">
    <div class="col-md-12">
        <!-- BEGIN SAMPLE TABLE PORTLET-->
        <div class="data-div">
            <div class="widget collapsed " style="margin-bottom:5px;">
                <div class="widget-header ">
                    <span class="widget-caption">数据列表</span>

                    <form  role="form" onsubmit="return false;" id="form_data_table_par_vip_order_list_1">

                        <div class="widget-buttons">
                            推荐层级:<select name="hierarchy" id="hierarchy"  style="width:160px;margin-right:10px;padding: 3px;" >
                            <option value="1">--直推--</option>
                            <option value="2">--间推--</option>
                        </select>
                        </div>

                        <div class="widget-buttons">
                            购买类型:<select name="type" id="type"  style="width:160px;margin-right:10px;padding: 3px;" >
                            <option value="">--全部--</option>
                            <option value="0">--线上--</option>
                            <option value="10">--线下--</option>
                        </select>
                        </div>

                        <div class="widget-buttons">
                            支付状态:<select name="orderStatus"  style="width:160px;margin-right:10px;padding: 3px;" >
                            <option value="">--全部--</option>
                            <option value="0">--未支付--</option>
                            <option value="1">--已支付--</option>
                        </select>
                        </div>

                        <div class="widget-buttons">
                            订单ID：<input type="text" name="orderId" style="width:120px;height:25px;margin-right:10px;padding: 3px;">
                        </div>

                        <div class="widget-buttons">
                            用户ID：<input type="text" name="uid" style="width:120px;height:25px;margin-right:10px;padding: 3px;">
                        </div>

                        <div class="widget-buttons">
                            <button href="javascript:;" class="btn btn-blue btn-xs search"  data-title="查询" data-form="true" onclick="javascript:loadMyData();">查询</button>
                        </div>
                    </form>

                </div>
            </div>

            <div class="widget no-header ">

                <div class="widget-body">
                    <table class="table table-condensed table-bordered table-hover " id="data_table_par_vip_order_list_1">
                    </table>

                </div>
            </div>

        </div>
        <!-- END SAMPLE TABLE PORTLET-->
    </div>
</div>
<script type="text/javascript">

    $(document).ready(function() {

        //look-up 查询条件 会员
        Select2Ex.handleForm4select2({target:$("#form_data_table_par_vip_order_list_1")});

        TableAjax.init('data_table_par_vip_order_list_1',{
            sAjaxSource: "vip/order/par_list",
            aaSorting: [
                [0, "asc" ]
            ], // 需要自定义
            uxDataTitle:"null",
            uxCheckable:false,
            uxCloseScroll:true,
            uxDrapable:false,
            aoColumns: [
                {sTitle:'订单ID',  mData: "id",uxLongText:true},
                {sTitle:'用户ID',  mData: "uid"},
                {sTitle:'购买或升级的VIP类型',  mData: "vipType",
                    mRender:function(data,d,all){
                        var vip = "";
                        if(all.vipType==1){vip="省代";}
                        if(all.vipType==2){vip="市代";}
                        if(all.vipType==3){vip="区代";}
                        if(all.vipType==0){vip="非vip";}
                        if(all.vipType==21){vip="省级服务商";}
                        if(all.vipType==23){vip="区县服务商";}
                        return vip;
                    }
                },
                {sTitle:'付款状态',  mData: "orderStatus",
                    mRender:function(data,d,all){
                        if (all.orderStatus==0){
                            return "未支付";
                        }else if (all.orderStatus==1){
                            return "已支付";
                        }
                        return "未知";
                    }
                },
                {sTitle:'实付金额（￥）',  mData: "totAmount",
                    mRender:function (all,d,all) {
                        return (all.totAmount/100).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,');
                    }
                },
                {sTitle:'上级推广人ID',  mData: "pushUid"},
                {sTitle:'上级推广人分成比例（%）',  mData: "pushSplit"},
                {sTitle:'上级推广人分成金额（￥）',  mData: "pushAmount",
                    mRender:function (all,d,all) {
                        return (all.pushAmount/100).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,');
                    }
                },
                {sTitle:'购买类型',  mData: "type",
                    mRender:function(data,d,all){
                        if (all.type==0){
                            return "线上";
                        }else if (all.type==10){
                            return "线下";
                        }
                        return "未知";
                    }
                },

            ]

        });

    });

</script>